<?php
include dirname(__FILE__)."\lib\dll.class.php";
$k = new windll("kernel32.dll");

$dir = str_repeat("\0",1024);
$k->GetCurrentDirectoryA(array(1024,&$dir));

$dir = substr($dir,0,strpos($dir,"\0"));
echo $dir;

if(php_sapi_name()=='cli')system("pause");
?>
